package com.file.system.service.system;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.file.system.entity.res.DataPage;
import com.file.system.entity.system.WebFilterWord;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 过滤词汇 服务类
 *
 * @author jch
 * @since 2023-07-17
 */
public interface IWebFilterWordService {

    //添加过滤词汇
    boolean save(WebFilterWord webFilterWord);

    //删除过滤词汇
    boolean removeById(@Param("id") Long id);

    //通过ids删除过滤词汇
    boolean removeByIds(List<Long> ids);

    //编辑过滤词汇
    boolean updateById(@Param("et") WebFilterWord webFilterWord);

    //编辑
    boolean update(@Param("ew") UpdateWrapper<WebFilterWord> query);

    //添加过滤词汇(批量)
    boolean saveBatch(@Param("list") List<WebFilterWord> webFilterWordList);

    //查询过滤词汇
    List<WebFilterWord> list(@Param("ew") QueryWrapper<WebFilterWord> query);

    //通过ids查询过滤词汇集合
    List<WebFilterWord> listByIds(List<Long> ids);

    //查询所有非删除状态过滤词汇
    List<WebFilterWord> listAll();

    //查询过滤词汇分页
    DataPage<List<WebFilterWord>> page(@Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize, @Param("ew") QueryWrapper<WebFilterWord> query);

    //通过id查询过滤词汇
    WebFilterWord getById(@Param("id") Long id);

    //通过条件查询过滤词汇
    WebFilterWord getOne(@Param("ew") QueryWrapper<WebFilterWord> query);

    //查询过滤词汇数量
    int count(@Param("ew") QueryWrapper<WebFilterWord> query);


}
